//package com.jingdianjichi.auth.infra.rpc;
//
//import com.jingdianjichi.auth.api.UserFeignService;
//import com.jingdianjichi.auth.entity.AuthUserDTO;
//import com.jingdianjichi.auth.entity.Result;
//import com.jingdianjichi.auth.infra.entity.UserInfo;
//import org.springframework.stereotype.Component;
//
//import javax.annotation.Resource;
//
///**
// * @Description: //todo
// * @Author: 张广焱
// * @Date: 2024-02-14 21:50
// */
//@Component
//public class UserRpc {
//
//    @Resource
//    private UserFeignService userFeignService;
//
//    public UserInfo getUserInfo(String userName) {
//        AuthUserDTO authUserDTO = new AuthUserDTO();
//        authUserDTO.setUserName(userName);
//        Result<AuthUserDTO> result = userFeignService.getUserInfo(authUserDTO);
//        AuthUserDTO data = result.getData();
//        UserInfo userInfo = new UserInfo();
//        if (!result.getSuccess()) {
//            return  userInfo;
//        }
//        userInfo.setUserName(data.getUserName());
//        userInfo.setNickName(data.getNickName());
//        return userInfo;
//    }
//
//}
